<%= form_for(@appointment) do |f| %>
  <% if @appointment.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@appointment.errors.count, "error") %> prohibited this appointment from being saved:</h2>

      <ul>
      <% @appointment.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :appointment_date %><br />
    <%= f.date_select :appointment_date %>
  </div>
  <div class="field">
    <%= f.check_box :showed_up %>
    <%= f.label :showed_up %><br />
  </div>
  <div class="field">
    <%= f.label :notes %><br />
    <%= f.text_area :notes %>
  </div>
  <%= hidden_field_tag(:patient_id, @patient.id) %>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
